package ioexercise;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;

public class ISRDemo {
    public static void main(String[] args) throws IOException {
        //转换流
        FileInputStream fis=new FileInputStream("osw.txt");
        InputStreamReader isr=new InputStreamReader(fis);
        int d=0;
       while((d=isr.read())!=-1) {
           char s=(char)d;
           System.out.print(s);
       }
        isr.close();

    }
}
